﻿@{
    int postId = 0;
    string boardName = string.Empty;
    int.TryParse(Model.ToString(), out postId);
    boardName = postId == 0 ? "留言板" : "评论";
}
<style>
    .row {
        margin-left: 0;
        margin-right: 0;
    }
</style>
<!--此文章留言区-->
<div class="row">
    <h2 style="text-align:right;vertical-align:top;margin-top:0;">@boardName</h2>
</div>
<div class="row" id="MsgBoard">

</div>
<div class="row" style="text-align:right;margin-right:5px;">
    <ul class="pagination pagination-sm" id="boardPage"></ul>
</div>
<input id="lastReplyId" style="visibility:collapse" value="">
<div class="row">
    <form role="form" id="boardForm" style="margin-bottom:10px;">
        <input id="avatarUrl" style="display:none" />
        <div class="form-group">
            <input type="text" class="form-control" id="nickName" placeholder="你的昵称">
        </div>
        <div class="form-group">
            <textarea class="form-control" id="comment" placeholder="我有话说"></textarea>
        </div>
        <button type="button" class="btn btn-info" onclick="leaveComment('@postId','0','Blog/MsgBoardContent')">说完了</button>
    </form>
</div>
<script>
    function emojiInit() {
        $("#comment").emojioneArea({
            autoHideFilters: true
        });
    }
    function BoardBindUserInfo() {
        $("#avatarUrl").val(getAvatar());
        $("#nickName").val(getUserName());
        $("#nickName").attr("placeholder", getUserName());
        emojiInit();
    }
    getBoard('', '', '@postId', 1, 'Blog/MsgBoardContent');
    BoardBindUserInfo();
</script>
